using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Runtime.Serialization;

namespace KPIS.GERP.Models.BGM
{
	[Table("bgm_mas_strategy_version"), DataContract]
    public class MasStrategyVersion
    {

        public MasStrategyVersion()
        {
            //this.MasStrategyMappings = new HashSet<MasStrategyMapping>();
        }

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "BgmStratVerId", ResourceType = typeof(Resources.MasStrategyVersionResource))]
		[Column("bgm_strat_ver_seq", TypeName="int")]
        public int BgmStratVerId { get; set; }

		[DataMember, Display(Name = "BgmStratVerCode", ResourceType = typeof(Resources.MasStrategyVersionResource))]
		[Column("bgm_strat_ver_code", TypeName="ntext")]
        public string BgmStratVerCode { get; set; }

		[DataMember, Display(Name = "BgmYearStart", ResourceType = typeof(Resources.MasStrategyVersionResource))]
		[Column("bgm_year_start", TypeName="int")]
        public Nullable<int> BgYearStart { get; set; }

		[DataMember, Display(Name = "BgmYearEnd", ResourceType = typeof(Resources.MasStrategyVersionResource))]
		[Column("bgm_year_end", TypeName="int")]
        public Nullable<int> BgYearEnd { get; set; }

		[ForeignKey("JobSite")]
		[DataMember, Display(Name = "JobSiteId", ResourceType = typeof(Resources.MasStrategyVersionResource))]
		[Column("job_site_seq", TypeName="int")]
        public Nullable<int> JobSiteId { get; set; }

        //[DataMember ]
        //public virtual ICollection<MasStrategyMapping> MasStrategyMappings { get; set; }

        [DataMember]
		public virtual HRM.JobSite JobSite { get; set; }



        #region RecordStatus

        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("record_status", TypeName="ntext")]
        public string RecordStatus { get; set; }

        [DataMember, Display(Name = "CreatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("created_by", TypeName="int")]
        public Nullable<int> CreatedBy { get; set; }

        [DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("created_when", TypeName="datetime2")]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

        [DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("updated_by", TypeName="int")]
        public Nullable<int> UpdatedBy { get; set; }

        [DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(SYS.Resources.RecordStatusResource))]
		[Column("updated_when", TypeName="datetime2")]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

        #endregion

    }
}